runGame ={
			geoObject:null,
			model : null,
			cube: null,
			arrow:null,
			arrowFrame:null,
			timeCount:null,
			hourRemain:null,
			minRemain:null,
			secRemain:null,
			startTime:null,
			totleTime:null,
			initialization:function(){
				var lat   = ARGON.geolocation.getLLA().latitude;
				var lon   = ARGON.geolocation.getLLA().longitude;
				var alt   = ARGON.geolocation.utm.altitude;
				//console.log("set GeoOjbect at: "+ lat);
				//console.log(lon);
				//console.log(alt);
				timeCount=0; hourRemain=0; minRemain=1; secRemain=15;
				startTime =0;
				totleTime = 65;
				geoObject = ARGON.createGeoObject(lat,lon,alt);
				var cubeGeometry, cubeMaterial;
                cubeGeometry = new THREE.CubeGeometry(250, 50, 50, 2, 2, 2);
                cubeMaterial = new THREE.MeshLambertMaterial({ color: 0xFFFF00, shading: THREE.FlatShading, overdraw: true });
                 
				 
				cube = new THREE.Mesh( cubeGeometry, cubeMaterial );
				cube.position.x = 500;
				cube.position.y = 0;
				cube.position.z = 0;
				cube.scale.x = 1;
				cube.scale.y = 1;
				cube.scale.z = 1;
				
				//arrow
				var arrowPoints = [];
				
				arrowPoints.push( new THREE.Vector2 (   25,  -100 ) );
				arrowPoints.push( new THREE.Vector2 (  25,  70 ) );
				arrowPoints.push( new THREE.Vector2 (  35,  70 ) );
				arrowPoints.push( new THREE.Vector2 (  0, 120 ) );
				arrowPoints.push( new THREE.Vector2 (  -35,  70 ) );
				arrowPoints.push( new THREE.Vector2 (  -25,  70 ) );
				arrowPoints.push( new THREE.Vector2 ( -25,  -100 ) );
				
				var arrowShape = new THREE.Shape( arrowPoints );
							
				var extrusionSettings = {
					size: 30, height: 4, curveSegments: 3,
					bevelThickness: 1, bevelSize: 2, bevelEnabled: false, amount: 50,
					material: 0, extrudeMaterial: 1
				};											
	
				var arrowGeometry = new THREE.ExtrudeGeometry( arrowShape, extrusionSettings );
				
				var materialFront = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
				var materialSide = new THREE.MeshBasicMaterial( { color: 0xffe000 } );
				var materialArray = [ materialFront, materialSide ];
				var arrowMaterial = new THREE.MeshFaceMaterial(materialArray);	
				
				arrow = new THREE.Mesh( arrowGeometry, arrowMaterial );
				arrow.position.set(0,-500,500);
				arrow.rotation.x=Math.PI/2;
				
				var wireframeTexture = new THREE.MeshBasicMaterial( { color: 0x000000, wireframe: true, transparent: true } ); 
				arrowFrame = new THREE.Mesh( arrowGeometry, wireframeTexture );
				arrowFrame.position.set(0,-500,500);
				arrowFrame.rotation.x=Math.PI/2;
				
				
				
				var light = new THREE.PointLight(0xffffff);
				light.position.set(0,100,0);
				//geoObject.add(light);
				//geoObject.add(model);
				//geoObject.add(cube);
				geoObject.add(arrow);
				//geoObject.add(arrowFrame);
				ARGON.World.add( geoObject );
				
			
				ARGON.onRender = runGame.update;
	
			},
			updateTimer:function(){
				var remainingTime = document.getElementById("rTime");
				remainingTime.style.fontSize = "25px";
				var timeLeft = totleTime -timeCount;
				secRemain = Math.floor(timeLeft % 60);
				minRemain = Math.floor(timeLeft / 60);
				if(timeLeft == 0){
					alert("time out");
				}
				else if(timeLeft <0){
					remainingTime.innerHTML ="";
				}
				//if(secRemain<0){ minRemain--; secRemain=59;}
				//if(minRemain<0) {hourRemain--; minRemain=59;}
				//if(hourRemain<0) {alert("time out");}
				
				remainingTime.innerHTML = minRemain+' : '+secRemain;
				
			},
			update:function(time){
				if(startTime ==0){
					startTime = time;
				}
				var lat   = ARGON.geolocation.getLLA().latitude;
				var lon   = ARGON.geolocation.getLLA().longitude;
				var alt   = ARGON.geolocation.utm.altitude;
				//geoObject.latitude = lat;
				//geoObject.longitude = lon;
				//geoObject.altitude = alt;
				timeCount = (time-startTime)/1000;
				//console.log(timeCount);
				//console.log(timeCount);
				runGame.updateTimer();
				geoObject.geolocation.setGeoPosition(lat,lon,alt);
			
				//var dir = Geolocation.direction(33.776914, -84.389583, lat, lon);
				
				var dir = Geolocation.direction(lat, lon, 33.776914, -84.389583);
				var angle = Math.atan2(dir.diffNS, dir.diffEW);
				arrow.rotation.z=-1*angle;
				arrowFrame.rotation.z=-1*angle;
				
				var camera = ARGON.threeCamera;
				var projector = new THREE.Projector();
				var p2d = new THREE.Vector3(0,0,0.9998);
				var p3d = new THREE.Vector3();
				
				p3d = projector.unprojectVector(p2d, camera);
				//console.log(p3d.x+" "+ p3d.y+" "+p3d.z);
				arrow.position.set(p3d.x, p3d.y, p3d.z);
				arrowFrame.position.set(p3d.x, p3d.y, p3d.z);
				
				if(myApp.arriveObject()){
					myApp.updateObject();
				}
				
				
			},
			
		}

